package com.tyut.service;

import com.tyut.domain.Student;
import org.springframework.stereotype.Service;


    @Service
    public class StudentService {
        private final Student student;

        public StudentService(Student student) {
            this.student = student;
        }

        public Student getStudent() {
            return student;
        }

        public String getStudentInfo() {
            return "学生信息：学号 - " + student.getStdId() + ", 姓名 - " + student.getStdName() + ", 爱好 - " + student.getHobby();
        }
    }

